::@echo off & setlocal EnableDelayedExpansion
::包的名字
CHCP 65001

set "packageName=Escape_红方逃离_(${currVersion})"
:: 代码放的位置
set codePath=E:\Users\lambert\git\co10_Escape

set obj[0]=Altis
set obj[1]=Enoch
set obj[2]=Malden
set obj[3]=SefrouRamal
set obj[4]=Stratis
set obj[5]=Tanoa

set objCurrent=0
for /l %%a in (0,1,5) do (
    for /f "usebackq delims== tokens=1-2" %%i in (`set obj[%%a]`) do (
        ::echo aaa=%%i
        ::echo bbbb=%%j
        set objCurrent=%%j
        md %codePath%\code\Island
        copy %codePath%\Missions\%%j\include\defines.hpp %codePath%\code\include\defines.hpp
        copy %codePath%\Missions\%%j\Island\CommunicationCenterMarkers.sqf %codePath%\code\Island\CommunicationCenterMarkers.sqf
        copy %codePath%\Missions\%%j\Island\PatrolBoatMarkers.sqf %codePath%\code\Island\PatrolBoatMarkers.sqf
        copy %codePath%\Missions\%%j\Island\VillageMarkers.sqf %codePath%\code\Island\VillageMarkers.sqf
        copy %codePath%\Missions\%%j\Island\WorldConfig.sqf %codePath%\code\Island\WorldConfig.sqf
        copy %codePath%\Missions\%%j\mission.sqm %codePath%\code\mission.sqm
        PBOConsole -pack %codePath%\code "E:\Missions\%packageName%.%%j.pbo"
        del %codePath%\code\include\defines.hpp
        del %codePath%\code\mission.sqm
        rd /s/q %codePath%\code\Island
    )
    echo objCurrent=!objCurrent!
)
::pause

